package com.heze.xunhuan.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heze.xunhuan.entity.Category;
import com.heze.xunhuan.mapper.CategoryMapper;
import com.heze.xunhuan.service.CategoryService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 分类服务实现类
 *
 * @author heze-xunhuan
 */
@Service
@RequiredArgsConstructor
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements CategoryService {

    @Override
    public List<Category> getAllCategories() {
        return this.list();
    }

    @Override
    public Category getCategoryById(Integer id) {
        return this.getById(id);
    }
}
